Create a Return Type
This page last changed on Nov 27, 2008.
Oracle Data Service Integrator Documentation > Data Services Developer's Guide How To Create a Return TypeThis topic describes the basics of creating return types for logical entity data services in the Query Mapper and directly in XML. Choose a TechniqueData services use both XML types and return types. XML types represent the shape of a logical data service, in the form of an XML schema. They are templates from which return types are created, comparable to a Java class. You use an XML type when you first create a logical entity service and add an XML schema to define its shape. Adding an XML Type to a ServiceReturn types represent the shape of data that a query produces when it is run. They are specific instances of an XML type, comparable to a Java object. Return types are the R in an XQuery FLWOR clause. For example, a service's primary read function returns a return type. Checking the Return Type of a Read FunctionAn XML type is the backbone of a logical data service, because it defines the data the service returns. The XML schema that represents the XML type can combine any elements from any data sources the logical data service uses, including relational sources, web services, XML files, text files, and Java methods. The schema for the logical data service is designed as a separate layer of the dataspace project, regardless of the actual structure of the underlying physical data sources. The schema is not required to use all elements in, or the same structure as, the physical data sources. You can create a return type schema, an XSD file, in two ways:
You should create the XSD file in the logical layer of your dataspace project, as it belongs to the logical data service. Workshop for WebLogic provides several XML editors, which you can see if you right-click an XSD file in the Project Explorer and choose Open With. Choosing an XML Editor in Workshop for WebLogicWrite a Return Type SchemaTo create the schema in an XML editor in Workshop for WebLogic:
You can also create the return type schema using an XML editor outside Workshop for WebLogic and then move the XSD file to your Workshop for WebLogic dataspace project. Generate a Schema FileYou can also have Oracle Data Service Integrator generate the return type schema after you build the query map visually. To generate the schema in Workshop for WebLogic, follow these instructions (or see Create Your First Data Services for detailed instructions):
See AlsoHow TosOther Resources
|
Document generated by Confluence on Jan 13, 2009 15:57 |